package painting

import (
	base "gxcvu-ai/app/controller/Base"
	"gxcvu-ai/pkg/painting"
	"gxcvu-ai/validate"

	"github.com/gin-gonic/gin"
)

type PaintingController struct {
	base.BaseController
}

func (pc *PaintingController) Create(c *gin.Context) {
	request := validate.PaintingForm{}

	if ok := validate.Validate(c, &request, validate.ValidatePainting); !ok {
		return
	}

	var paintingEng painting.Wangxiang
	paintingEng.SubmitJob(request.Prompt, request.NegativePrompt, request.Style, request.Size, c)
}

func (pc *PaintingController) Get(c *gin.Context) {
	taskId := c.Params.ByName("task_id")
	paintingEng := painting.Wangxiang{}
	paintingEng.GetTaskStatus(taskId, c)
}
